﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Titler.FPControls
{
    /// <summary>
    /// Interaction logic for CtrlTec.xaml
    /// </summary>
    public partial class TecCtrl : UserControl
    {
        public TecCtrl()
        {
            InitializeComponent();
        }



        public string TitleReturn()
        {
            if (TECCount.Text != "" && TECCount.Text == "0")
            {
                return "(TEC, " + TECCount.Text + " OFF " + TECSize.Text + " INCH OD X " + TECThickness.Text + " INCH WALL THICKNESS, " +
                    TECArmor.Text + ", " + TECCondMaterial.Text + ", " + TECInsulMaterial.Text + " INSULATION, " + TECFillMaterial.Text + " FILLER)";
            }
            else
                return "";
        }

        private void CountChanged(object sender, RoutedEventArgs e)
        {
            if (TECCount.Text == "" || TECCount.Text == "0")
            {
                TECSize.IsEnabled = false;
                TECThickness.IsEnabled = false;
                TECArmor.IsEnabled = false;
                TECCondMaterial.IsEnabled = false;
                TECInsulMaterial.IsEnabled = false;
                TECFillMaterial.IsEnabled = false;
            }
            else
            {
                TECSize.IsEnabled = true;
                TECThickness.IsEnabled = true;
                TECArmor.IsEnabled = true;
                TECCondMaterial.IsEnabled = true;
                TECInsulMaterial.IsEnabled = true;
                TECFillMaterial.IsEnabled = true;
            }
        }
    }
}
